//
//  UIImage+Image.h
//  OC_Poj_demo
//
//  Created by weixin on 2018/6/24.
//  Copyright © 2018年 weixn. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (Image)

//默认会识别当前是哪个类或者对象调用

//加载最原始的图片 没有渲染
+(instancetype)imageWithOriginalName:(NSString *)imageName;
///根据颜色生成图片
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;

- (UIImage *)drawRectWithRoundedCorner;

- (UIImage*)grayImage;

- (UIImage *)imageWithColor:(UIColor *)color;

//按比例缩放,size 是你要把图显示到 多大区域
+ (UIImage *)imageCompressFitSizeScale:(UIImage *)sourceImage targetSize:(CGSize)size;
#pragma mark - 获取单张图片的实际size
+ (CGSize)getSingleSize:(CGSize)singleSize MaxH:(CGFloat)MaxH MaxW:(CGFloat)MaxW url:(NSString*)url;
//根据图片url获取网络图片尺寸

+ (CGSize)getImageSizeWithURL:(id)URL;

@end
